function login() {
    if ($("#username").val()=="黑暗剑22"||$("#password").val()=="黑暗剑22")
    {
        layer.msg("请不要输入不存在的东西！");
        return;
    }
    if ($("#username").val()==""||$("#password").val()=="")
    {
        layer.msg("请输入账号和密码！");
        return;
    }

    var username = $("#username").val();
    var password = $("#password").val();
    $.ajax({
        url:"/Login",
        cache:false,
        data:{username:username,password:password},
        //async: false,
        type:"post",
        success:function (msg) {
            layer.msg(msg+"！");
            if(msg=="密码错误")
            {
                return;
            }
            setTimeout('junp()',1000);
            // window.location.href = "/UserManager";
            // window.open("/UserManager")
        }
    });
}

function junp() {
    window.location.href = "/UserManager";
}